package com.example.aipdefficiency.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;

@Data
@Schema(description = "用户注册请求")
public class UserRegisterRequest {
    
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Schema(description = "手机号", example = "18888888888")
    private String mobile;
    
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*\\d)[a-zA-Z\\d@$!%*?&]{6,20}$", message = "密码必须包含字母和数字，长度6-20位")
    @Schema(description = "密码", example = "123456")
    private String password;
    
    @NotBlank(message = "确认密码不能为空")
    @Schema(description = "确认密码", example = "123456")
    private String confirmPassword;
    
    @NotBlank(message = "验证码不能为空")
    @Schema(description = "验证码", example = "123456")
    private String verifyCode;
    
    @NotBlank(message = "用户名不能为空")
    @Schema(description = "用户名", example = "testuser")
    private String username;
    
    @Schema(description = "用户类型：0-普通用户，1-发布方，2-执行方，3-双重角色", example = "0")
    private Integer userType = 0;
} 